Developer Documentation

QuickTime 4 API Documentation

Inside Macintosh: Macintosh Toolbox Essentials

Previous | Chapter Top | Chapter Contents | Next |

Window Definition IDs

The Window Manager supports nine standard window types and eight standard floating window types. You can create windows of the standard types by passing one of the window definition ID enumerators to NewCWindow (NewCWindow) or NewWindow (NewWindow) . You can also use these enumerators to specify one of the standard window types in a window resource; see "The Window Resource" for details.

A window definition ID incorporates both the window's definition function and its variation code. The resource ID of the window definition function is stored in the upper 12 bits of the integer, and the variation code is stored in the lower 4 bits.

Standard Window Types

These are the window definition IDs for the standard window types:

enum {              /* window definition IDs for standard window types */
    documentProc    = 0,    /* standard document dialog box */
    dBoxProc        = 1,    /* alert box or modal dialog box */
    plainDBox       = 2,    /* plain box */
    altDBoxProc     = 3,    /* plain box with shadow */
    noGrowDocProc   = 4,    /* movable window, no size box or zoom box */
    movableDBoxProc = 5,    /* movable modal dialog box */
    zoomDocProc     = 8,    /* standard document window */
    zoomNoGrow      = 12,   /* zoomable, nonresizable window */
    rDocProc        = 16    /* rounded-corner window */
};

Enumerator descriptions

documentProc
Window definition ID for a standard document dialog box.
dBoxProc
Window definition ID for an alert box or modal dialog box.
plainDBox
Window definition ID for a plain dialog box.
altDBoxPro
Window definition ID for a plain dialog box with a shadow.
noGrowDocProc
Window definition ID for a movable window with no size or zoom box.
movableDBoxProc
Window definition ID for a movable modal dialog box.
zoomDocPro
Window definition ID for a standard document window.
zoomNoGrow
Window definition ID for a zoomable, nonresizeable window.
rDocProc
Window definition ID for a rounded-corner window.

You can also add a zoom box to a movable modal dialog box by specifying the sum of two constants: movableDBoxProc + zoomDocProc , but a zoom box is not recommended on any dialog box.

You can control the diameter of curvature of a rounded-corner window (window type rDocProc ) by adding one of these integers to the rDocProc constant:

Window definition ID

Diameters
of curvature

rDocProc

16, 16

rDocProc + 2

4, 4

rDocProc + 4

6, 6

rDocProc + 6

10, 10

Floating Window Types

These are the window definition IDs for the standard floating window types:

enum {  /* window definition IDs for standard floating window types */
    floatProc               = 1985,     /* standard floating window */
    floatGrowProc           = 1987,     /* resizable floating window */
    floatZoomProc           = 1989,     /* zoomable floating window */
    floatZoomGrowProc       = 1991,     /* zoomable, resizable floating
                                        /* window */
    floatSideProc           = 1993,     /* sideways floating window,
                                        /* no size or zoom box */
    floatSideGrowProc       = 1995,     /* sideways floating window
                                        /* with grow box */
    floatSideZoomProc       = 1997,     /* sideways floating window
                                        /* with zoom box */
    floatSideZoomGrowProc   = 1999      /* sideways floating window
                                        /* with grow box and zoom box */
};

Enumerator descriptions

floatProc
Window definition ID for a plain floating window with no size box or zoom box.
floatGrowProc
Window definition ID for a floating window with a grow box.
floatZoomProc
Window definition ID for a floating window with a zoom box.
floatZoomGrowProc
Window definition ID for a floating window with a grow box and a zoom box.
floatSideProc
Window definition ID for a sideways floating window with no size or zoom box.
floatSideGrowProc
Window definition ID for a sideways floating window with a grow box.
floatSideZoomProc
Window definition ID for a sideways floating window with a zoom box.
floatSideZoomGrowProc
Window definition ID for a sideways floating window with a grow and a zoom box.

Resource IDs of Standard Window Definition Functions

These are the resource IDs for the standard window definition functions:

enum {      /* resource IDs for standard window definition functions */
    kStandardWindowDefinition       = 0,    /* for document windows and dialogs */
    kRoundWindowDefinition          = 1,    /* DA-style window */
    kFloatingWindowDefinition       = 124   /* for floating windows */
};
kStandardWindowDefinition
Resource ID for document windows dialog boxes.
kRoundWindowDefinition
Resource ID for desk-accessory style windows.
kFloatingWindowDefinition
Resource ID for floating windows.

Variant Codes

These are the variant codes used with the standard and floating window definition functions:

enum {
/* for use with kStandardWindowDefinition */
    kModalDialogVariantCode                 = 1,        /* modal dialog variant code */
    kMovableModalDialogVariantCode          = 5,        /* movable modal dialog
                                                        /* variant code */
/* for use with kFloatingWindowDefinition */
    kSideFloaterVariantCode                 = 8         /* sideways floating window
                                                        /* variant code */
};
kModalDialogVariantCode
Variant code for modal dialog boxes for use with the standard window definition function.
kMovableModalDialogVariantCode
Variant code for movable modal dialog boxes for use with the standard window definition function.
kSideFloaterVariantCode
Variant code for sideways floating window for use with the floating window definition function.

© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next